package com.treeroot.planeservice.plane.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 *
 * </p>
 *
 * @author TreeRoot
 * @since 2022-04-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "PcPlane对象", description = "航班信息")
public class PcPlane implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "出发城市 ")
    private String startCity;

    @ApiModelProperty(value = "到达城市")
    private String endCity;

    @ApiModelProperty(value = "出发日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private String startDateTime;

    @ApiModelProperty(value = "返回日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")

    private String endDateTime;


    @ApiModelProperty(value = "出发机场")
    private String endAirport;
    @ApiModelProperty(value = "航班类型")
    private String planeType;

    @ApiModelProperty(value = "抵达机场")
    private String startAirport;

    @ApiModelProperty(value = "舱位等级 1头等，2公务，3经济")
    private String grade;

    @ApiModelProperty(value = "起飞时间")
    @JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8")
    private String flightStartTime;

    @ApiModelProperty(value = "抵达时间")
    @JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8")
    private String flightEndTime;


    @ApiModelProperty(value = "剩余票数")
    private Integer seating;


    @ApiModelProperty(value = "票价")
    private Integer price;


    @ApiModelProperty(value = "能不能查到机票，1表示能 0表示不能")
    private int flag;

    @ApiModelProperty(value = "航班号 ")
    private String flightNumber;

    @ApiModelProperty(value = "带婴儿，1表示带 0表示没带")
    private int crib;

    @ApiModelProperty(value = "带儿童，1表示带 0表示没带")
    private int child;



    @ApiModelProperty(value = "乐观锁")
    @Version
    private Long version;


    @ApiModelProperty(value = "逻辑删除 1（true）已删除， 0（false）未删除")
    @TableLogic
    private Integer isDeleted;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;



}
